﻿using System;
using System.Windows;
using System.Windows.Data;

namespace PhoneInfo
{
    public class StringToString : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string type = value as string;
            if (type == "pause" )
            {
                return "暂停";
            }
            else if (type=="complate")
            {
                return "完成";
            }
            else
            {
                return "正在下载";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
